#!/bin/bash

DIRNAME=$1/img/
IMG=$2

GREEN=$'\e[1;32m'
NORMAL=$'\e[0m'

read -a array < /home/bianhui/gmes/app/line/dk/ver

VER=${array[0]}

NEWFILE=$DIRNAME/$IMG-$VER.tar

echo -e ".................................export $GREEN $IMG:$VER $NORMAL to $NEWFILE"

docker save $IMG:$VER -o $NEWFILE
gzip $NEWFILE
